<?php

namespace App\Http\Requests\API;

use App\Models\StaffOrder;
use InfyOm\Generator\Request\APIRequest;

class CreateStaffOrderAPIRequest extends APIRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            // 'staff_id' => 'required',
            'card_id'   => 'required',
            'card_type' => 'required',
            'card_date' => 'required',
            'amount'    => 'required',
        ];
    }

    public function messages(){
        return [
            'staff_id.required'  => '员工 id 不能为空！',
            'card_id.required'   => '卡 id 不能为空！',
            'card_type.required' => '请选择卡类型',
            'card_date.required' => '请填写卡时间',
            'amount.required'    => '卡金额不正确',
        ];
    }

}
